package com.hotel.service.Impl;

import com.hotel.mapper.OrderMapper;
import com.hotel.pojo.OrderInfoManager;
import com.hotel.pojo.RoomManager;
import com.hotel.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;


import java.util.List;

public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;


    @Override
    public Integer insertOrder(OrderInfoManager orderInfoManager) {
        return orderMapper.insertOrder(orderInfoManager);
    }

    @Override
    public RoomManager querRoomById(Integer roomId) {
        return orderMapper.querRoomById(roomId);
    }

    @Override
    public Integer updateRoomState(Integer roomId, Integer roomState) {
        return orderMapper.updateRoomState(roomId,roomState);
    }

    @Override
    public OrderInfoManager queryUser(String userPhone) {
        return orderMapper.queryUser(userPhone);
    }


    @Override
    public Integer insertOutHotel(OrderInfoManager orderInfoManager) {
        return orderMapper.insertOutHotel(orderInfoManager);
    }

    @Override
    public List<OrderInfoManager> selectOrder() {
        return orderMapper.selectOrder();
    }

    @Override
    public List<RoomManager> selectRoomManager() {
        return orderMapper.selectRoomManager();


    }

    @Override
    public Integer deleteUserInfo(Long userPhone) {
        return orderMapper.deleteUserInfo(userPhone);
    }

    @Override
    public OrderInfoManager queryUserName(String userName) {
        return orderMapper.queryUserName(userName);
    }

    public OrderMapper getOrderMapper() {
        return orderMapper;
    }

    public void setOrderMapper(OrderMapper orderMapper) {
        this.orderMapper = orderMapper;
    }
}
